<template>
  <div id="app">
    <router-view />
  </div>
</template>

<script>
export default  {
  name:  'App',
  data() {
    return {
      height:{
        ht:document.body.clientHeight -190,
        htp: document.body.clientHeight -215,
        hts: document.body.clientHeight -290,
        pointHt: document.body.clientHeight -130,
      }
    }
  },
  methods: {
    initWindow() {
      this.$store.dispatch('app/setWindow', this.height)
      let _this = this
      window.onresize = () => {
        return (() => {
          _this.height.ht = document.body.clientHeight -200
          _this.height.htp = document.body.clientHeight -250
          _this.height.hts = document.body.clientHeight -290
          _this.height.pointHt = document.body.clientHeight -130
          this.$store.dispatch('app/setWindow', _this.height)
        })()
      }
    }
  },
  created() {
    this.initWindow()
  }
}
</script>
